package com.youth.youthservice.client;
import com.youth.ClientEntity.UserEntity;
import com.youth.commonutils.R;
import com.youth.commonutils.UserDto;
import com.youth.youthservice.client.Impl.MemberDegradeFeignClient;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;

@Component
@FeignClient(value = "service-ucenter",fallback = MemberDegradeFeignClient.class)
public interface MemberClient {

    /*根据memberId获取member的name(误删-huang)*/
    @ApiOperation(value = "根据memberId获取member的name")
    @GetMapping("/userservice/member/ByIdGetName/{memberId}")
    public String ByIdGetName(@PathVariable(value = "memberId") String memberId);

    /*根据memberId获取member的信息(误删-huang)*/
    @ApiOperation(value = "根据memberId获取member的信息")
    @PostMapping("/userservice/member/ByIdGetUser/")
    public UserEntity ByIdGetUser(@RequestBody HashMap<String,String> map);

    @ApiOperation(value = "远程调用获取用户的DTO信息")
    @GetMapping("/userservice/member/getLoginInfoByUserId/{userId}")
    public UserDto getLoginInfo(@PathVariable("userId") String userId);




}
